import request from '@/utils/request'
// 获取所有角色
export const getRole = () => request.get('/park/sys/role')
// 获取所有功能权限
export const getPermission = () => request.get('/park/sys/permision/all/tree')
// 获取当前角色权限
export const getRolePermission = (roleId) => request.get(`/park/sys/role/${roleId}`)
// 获取角色关联用户列表
export const getRoleUser = (roleId) => request.get(`/park/sys/roleUser/${roleId}`)
// 添加角色
export const addRole = (data) => request.post('/park/sys/role', data)
// 修改角色
export const updateRole = (data) => request.put('/park/sys/role', data)
// 删除角色
export const deleteRole = (id) => request.delete(`/park/sys/role/${id}`)
// 获取登录用户权限信息
export const getProfile = () => request.get('/park/user/profile')
